package com.uni.utils;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Map;

public class ParamUtil {
    public static Map<String, String> translate(Map<String, String> map) {
        try {
            for (String key : map.keySet()) {
                map.put(URLDecoder.decode(key, "utf-8"),
                        URLDecoder.decode(map.get(key), "utf-8"));
            }
        }catch(UnsupportedEncodingException e){
            e.printStackTrace();
        }
        return map;
    }
}
